<template>
    <div>
      <br />

      <myheader/>

     
      <div class="container">

          <div class="item_column">
              <div class="left">   
                  
              </div>

              <div class="right"> 
                <br />
                <br />

                <h1>发布文章页面</h1>

                <van-cell-group>
                    <van-field label="标题" v-model="form.title"/>
                    <van-field label="内容" v-model="form.content"/>

                    <van-button @click="issue">提交</van-button>
                </van-cell-group>
                
         
              </div>

          </div>

      </div>
      
    </div>
</template>
  
<script>
import maxios from '../http/axios'
import myheader from './myheader.vue'


  export default {
    components: {
      'myheader':myheader,
      
    },
  
    data() {
      return {
        form: {},

        uid:localStorage.getItem('uid')

      }
    },

    methods: {
        // 发布文章
        issue(){
            maxios('/add_fiction?uid='+this.uid,'post',this.form).then(res=>{
                if(res.code==200){
                    alert('发布成功等待审核')
                
                }else {
                    alert('抱歉出错了')

                }
      
            })
        }
    },
    mounted() {
       
    }
  }
</script>
  
<style scoped>
@import url("../assets/style.css");

</style>